﻿using System;
using NewLife.CommonEntity;
using NewLife.CommonEntity.Web;

namespace NewLife.YWS.Entities.BLL
{
    /// <summary>
    /// 页面基类
    /// </summary>
    /// <typeparam name="TAdminEntity"></typeparam>
    /// <typeparam name="TMenuEntity"></typeparam>
    public abstract class PageBase : WebPageBase<Admin, Menu>
    {
        /// <summary>
        /// 校验权限
        /// </summary>
        /// <returns></returns>
        public override Boolean CheckPermission()
        {
            if (base.CheckPermission()) return true;

            Response.Redirect("../Login.aspx");
            return false;
        }
    }
}